﻿<Window x:Class="SecurityAdminSuite.AboutBox"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	Title="{Binding RelativeSource={RelativeSource Self}, Mode=OneTime, Path=ProductTitle}" 
	x:Uid="idAboutBox"
	Style="{DynamicResource AboutDialogStyle}" WindowStartupLocation="CenterOwner" Icon="/SecurityAdminSuite;component/Images/App.png" Width="498">
	<Window.Resources>
		<XmlDataProvider x:Key="aboutProvider" XPath="ApplicationInfo" IsAsynchronous="False" IsInitialLoadEnabled="True">
			<x:XData>
				<ApplicationInfo xmlns="">
					<Link Uri="http://memorylifter.codeplex.com/wikipage?title=AdminSuite">More Info</Link>
				</ApplicationInfo>
			</x:XData>
		</XmlDataProvider>
		<Style x:Key="AboutDialogStyle" TargetType="Window">
			<Setter Property="Height" Value="Auto" />
			<Setter Property="Width" Value="500" />
			<Setter Property="ShowInTaskbar" Value="False" />
			<Setter Property="ResizeMode" Value="NoResize" />
			<Setter Property="WindowStyle" Value="SingleBorderWindow" />
			<Setter Property="SizeToContent" Value="Height" />
		</Style>
		<Style x:Key="DisplayAreaStyle" TargetType="{x:Type DockPanel}">
			<Setter Property="Margin" Value="10,10,10,5" />
		</Style>
		<Style x:Key="BackgroundStyle" TargetType="{x:Type StackPanel}">
			<Setter Property="Background">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0,1">
						<GradientStop Offset="0" Color="LightBlue" />
						<GradientStop Offset="0.55" Color="White" />
						<GradientStop Offset="0.85" Color="White" />
						<GradientStop Offset="1" Color="LightBlue" />
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
		</Style>
		<Style TargetType="Label">
			<Setter Property="Padding" Value="0" />
		</Style>
		<Style x:Key="ParagraphSeparator" TargetType="{x:Type Label}">
			<Setter Property="Padding" Value="0,10,0,0" />
		</Style>
		<Style x:Key="LinkLabelStyle">
			<Setter Property="Control.Padding" Value="0" />
			<Setter Property="Control.VerticalAlignment" Value="Center" />
		</Style>
	</Window.Resources>
	<StackPanel x:Uid="clientArea" Style="{StaticResource BackgroundStyle}">
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="150"/>
				<ColumnDefinition />
			</Grid.ColumnDefinitions>

			<Image Grid.Column="0" Source="/SecurityAdminSuite;component/Images/AdminSuiteLogo.png" />
			<DockPanel Grid.Column="1"
			x:Uid="displayArea" Style="{StaticResource DisplayAreaStyle}" 
					DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Mode=OneTime}">
				<Label x:Name="productName" x:Uid="productName" DockPanel.Dock="Top" 
				   Content="{Binding Mode=OneTime, Path=Product}" />
				<StackPanel x:Uid="versionArea" Orientation="Horizontal" DockPanel.Dock="Top">
					<Label x:Name="versionLabel" x:Uid="VersionLabel" Content="Version - " />
					<Label x:Name="version" x:Uid="version" Content="{Binding Mode=OneTime, Path=Version}" />
				</StackPanel>
				<Label x:Name="copyright" x:Uid="copyright" Content="{Binding Mode=OneTime, Path=Copyright}" DockPanel.Dock="Top" />
				<Label x:Name="company" x:Uid="company" Content="{Binding Mode=OneTime, Path=Company}" DockPanel.Dock="Top" />
				<Label x:Name="reserved" x:Uid="reserved" Content="All Rights Reserved." DockPanel.Dock="Top" />

				<DockPanel x:Uid="buttonArea" DockPanel.Dock="Bottom">
					<Button x:Name="okButton" x:Uid="okButton" Content="OK" MinWidth="75" Margin="0,5" DockPanel.Dock="Right" IsDefault="True" IsCancel="True" />
					<Label x:Name="productLink" x:Uid="productLink" Style="{StaticResource LinkLabelStyle}" >
						<Hyperlink x:Name="hyperlink" x:Uid="hyperlink" NavigateUri="{Binding Mode=OneTime, Path=LinkUri}"  Style="{StaticResource LinkLabelStyle}"
							   Hyperlink.RequestNavigate="hyperlink_RequestNavigate">
							<TextBlock Text="{Binding Mode=OneTime, Path=LinkText}" />
						</Hyperlink>
					</Label>
				</DockPanel>
				<TextBox x:Name="description" x:Uid="description" Text="{Binding Mode=OneTime, Path=Description}" DockPanel.Dock="Bottom"
					 MinLines="6" MaxLines="6" IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalScrollBarVisibility="Auto" TextAlignment="Justify" />
				<Label x:Name="info" x:Uid="info" Style="{StaticResource ParagraphSeparator}" VerticalContentAlignment="Bottom" DockPanel.Dock="Bottom"
				   Content="Product details:" />
			</DockPanel>
		</Grid>
	</StackPanel>
</Window>